//
//  MMySupperViewController.m
//  1gene
//
//  Created by 1jiyin on 16/4/13.
//  Copyright © 2016年 1jiyin. All rights reserved.
//

#import "MMySupperViewController.h"

@interface MMySupperViewController ()

@end

@implementation MMySupperViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor=[UIColor whiteColor];
    [self monitorNet];
    // Do any additional setup after loading the view.
}

-(void)monitorNet
{
    AFNetworkReachabilityManager *manager=[ AFNetworkReachabilityManager sharedManager];
    [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
        if (status== AFNetworkReachabilityStatusNotReachable) {
            [self.view showTiShiMessage:@"网络状态不佳"];
        }else if (status==AFNetworkReachabilityStatusReachableViaWiFi){
           // [self.view showTiShiMessage:@"正在使用WiFi"];
        }else if (status==AFNetworkReachabilityStatusUnknown){
           // [self.view showTiShiMessage:@"未知网络"];
        }else if (status==AFNetworkReachabilityStatusReachableViaWWAN){
           // [self.view showTiShiMessage:@"正在使用4G网络"];
        }
    }];
    [manager startMonitoring];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
